import request from '@/utils/request'

// 获取区域管理信息列表,搜索区域信息
export const getZoneManagementInfo = (params) => request({
  url: `/api/vm-service/region/search`,
  params
})

// 新增区域信息
export const addANewRegionInfo = (data) => request({
  url: '/api/vm-service/region',
  method: 'POST',
  data
})

// 查看当前项详情|| 获取点位信息
export const getPointInformation = params => request({
  url: '/api/vm-service/node/search',
  params
})

// 修改信息
export const modifyInformation = (id, data) => request({
  url: `/api/vm-service/region/${id}`,
  method: 'PUT',
  data
})

// 删除区域
export const delInfomation = id => request({
  url: `/api/vm-service/region/${id}`,
  method: 'DELETE'
})

// 获取点位管理的区域搜索
export const getPointSearch = params => request({
  url: '/api/vm-service/region/search',
  params
})

// 点位管理内的查看详情
export const seeDetailsInfo = id => request({
  url: `/api/vm-service/node/vmList/${id}`
})

// 所属商圈列表
export const getShoppingList = () => request({
  url: '/api/vm-service/businessType'
})

// 点位管理合作商列表
export const getPartnersList = params => request({
  url: '/api/user-service/partner/search',
  params
})

// 新增点位
export const addPointInfo = data => request({
  url: '/api/vm-service/node',
  method: 'POST',
  data
})

// 点位列表中修改数据
export const putPointInfo = (id, data) => request({
  url: `/api/vm-service/node/${id}`,
  method: 'PUT',
  data
})

// 删除信息
export const delPoint = id => request({
  url: `/api/vm-service/region/${id}`,
  method: 'DELETE'
})

// 新增合作商信息
export const addPartnersUser = data => request({
  url: '/api/user-service/partner',
  method: 'POST',
  data
})

// 重置合作商密码
export const resetPartnersPwd = id => request({
  url: `/api/user-service/partner/resetPwd/${id}`,
  method: 'PUT'
})

// 修改合作商信息
export const putPartnersInfo = (id, data) => request({
  url: `/api/user-service/partner/${id}`,
  method: 'PUT',
  data
})

// 删除合作商
export const delPartnersInfo = id => request({
  url: `/api/user-service/partner/${id}`,
  method: 'DELETE'
})
